//
//  BasicApp.h
//  FileBrowser
//
//  Created by Basuke on 08/03/18.
//  Copyright 2008 Basuke's. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "/usr/include/sqlite3.h"


@interface BasicApp : NSObject <UIApplicationDelegate> {
	UIApplication *application;
    UIWindow *window;
    UIViewController *viewController;
	NSMutableDictionary *session;
    sqlite3 *db;
}

+ (BasicApp *)app;

@property(readonly,assign) UIApplication *application;
@property(readwrite,retain) UIWindow *window;
@property(readwrite,retain) UIViewController *viewController;
@property(readwrite,retain) NSMutableDictionary *session;

// override methods [required]
- (UIViewController *)createViewController;
- (void)windowWillDisplay;
- (void)windowDidDisplay;

@end

@interface BasicApp(Environments)

- (NSString *)rootDirPath;
- (NSString *)homeDirPath;
- (NSString *)homeDirPath:(NSString *)name;
- (NSString *)documentDirPath;
- (NSString *)documentDirPath:(NSString *)name;
- (NSString *)resourcePath:(NSString *)name;
- (NSString *)temporaryDirPath;
- (NSString *)temporaryDirPath:(NSString *)name;
- (NSString *)env:(NSString *)key;

@end

@interface BasicApp(Database)

- (BOOL)db:(NSString *)name;

@end
